/*
 * @lc app=leetcode.cn id=598 lang=cpp
 *
 * [598] 范围求和 II
 */

// @lc code=start
class Solution
{
public:
  int maxCount(int m, int n, vector<vector<int>>& ops)
  {
    int L = INT_MAX, W = INT_MAX;
    for (auto& o : ops) {
      L = min(L, o[0]);
      W = min(W, o[1]);
    }
    return ops.size() ? L * W : m * n;
  }
};
// @lc code=end
